home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / nonport / wtabsize.c < prev   
Encoding:
C/C++ Source or Header  |  1993-06-17  |  1.1 KB  |  53 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    wtabsize
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_wtabsize = "$Header: C:\CURSES\nonport\RCS\wtabsize.c 2.1 1993/06/18 20:22:25 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   wtabsize()    - Set tab size in window
  15.  
  16.   X/Open Description:
  17.      Not available.
  18.  
  19.   PDCurses Description:
  20.      This routine sets the tabsize for stdscr and returns the previous
  21.      tab size settings.
  22.  
  23.   X/Open Return Value:
  24.      This routine returns the previous tab size setting upon success
  25.      otherwise, it returns ERR.
  26.  
  27.   PDCurses Errors:
  28.      
  29.  
  30.   Portability:
  31.      PDCurses    int wtabsize( WINDOW* win, int ts );
  32.      X/Open Dec '88    int wtabsize( WINDOW* win, int ts );
  33.      SysV Curses    
  34.      BSD Curses    
  35.  
  36. **man-end**********************************************************************/
  37.  
  38. int    wtabsize(WINDOW *win, int ts)
  39. {
  40.     int    origval;
  41.  
  42. #ifdef PDCDEBUG
  43.     if (trace_on) PDC_debug("wtabsize() - called\n");
  44. #endif
  45.  
  46.     if (win == (WINDOW *)NULL)
  47.         return( ERR );
  48.  
  49.     origval = win->_tabsize;
  50.     win->_tabsize = ts;
  51.     return( origval );
  52. }
  53.